package bean;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;

public class B01memberDTO {

	private B01memberVO vo;
	private Connection conn;
	
	
	public B01memberDTO() {
		conn = new MyOracle().getConn();
	}

	public boolean login(){
		boolean b= false;
		try {
			String sql = "select mid, pwd from member where mid=? and pwd =?";
			PreparedStatement pst = conn.prepareStatement(sql);
			pst.setString(1, vo.getM_id());
			pst.setString(2, vo.getM_pw());
			
			ResultSet rs = pst.executeQuery();
			if(rs.next()) b = true;
			pst.close();
			conn.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return b;
	}
	public B01memberVO getVo() {
		return vo;
	}

	public void setVo(B01memberVO vo) {
		this.vo = vo;
	}
	
	
}
